package cn.supermarket.service.impl;

import cn.supermarket.bean.AliPayBean;
import cn.supermarket.config.AliPayConfiguration;
import cn.supermarket.service.iservice.IPayService;
import com.alipay.api.AlipayApiException;
import org.mybatis.logging.Logger;
import org.mybatis.logging.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayServiceImpl implements IPayService {
 public static final Logger logger = LoggerFactory.getLogger(PayServiceImpl.class);

 @Autowired
 AliPayConfiguration alipay;

    @Override
    public String aliPay(AliPayBean aliPayBean) throws AlipayApiException {
        System.out.println("");
        return alipay.pay(aliPayBean);
    }
}